﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace View
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //The interval time of emptying caching, specified in seconds.
                this.PdfDocumentViewer1.CacheInterval = 1200;
                //caching time of an image, specified in seconds.
                this.PdfDocumentViewer1.CacheTime = 1000;
                //Cache the number of Image, default is 1000.
                this.PdfDocumentViewer1.CacheNumberImage = 1000;
                //The time of responding to event after stop scrolling, specified in milliseconds.default is 500.
                this.PdfDocumentViewer1.ScrollInterval = 300;
                //Zoom value of page, default is 1.
                this.PdfDocumentViewer1.ZoomFactor = 1.25f;
                this.PdfDocumentViewer1.CustomErrorMessages = "Error information";
                this.PdfDocumentViewer1.LoadFromFile("files/PDFViewer.pdf");
                //Set Color
                this.PdfViewerToolbar1.BackColor = System.Drawing.Color.FromArgb(255, 255, 243, 255);
                this.PdfViewerToolbar1.CountPage = this.PdfDocumentViewer1.CountPage;
                //Zoom value of page, default is 1.
                this.PdfViewerToolbar1.ZoomFactor = 1.25f;
            }
        }
    }
}